#!/usr/bin/python
import cPickle as p

shoplist = ['apple','rice']
shoplistFile = 'shoplist.txt'

#write to file
f = file(shoplistFile,'w')
p.dump(shoplist,f)
f.close()

#
del shoplist

#read
f = file(shoplistFile)
storelist = p.load(f)
print storelist